<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Happy dong
 * Created Time: 2019-07-11 17:37
 *
 * Version: 2.0
 */

namespace App\Modules\Employee\Validators;


use Flower\Core\Repository\Contracts\ValidatorInterface;
use Flower\Core\Repository\Validator\LaravelValidator;

class PortfolioResourceValidator extends LaravelValidator
{
	protected $rules = [
		ValidatorInterface::RULE_CREATE => [
			'portfolio_id' => 'sometimes|required|numeric',
			'resource_id'  => 'sometimes|required|numeric',
			'type'         => 'sometimes|required|numeric',
		]
	];
	protected $messages = [
		'type.required'         => '类型不能为空',
		'portfolio_id.required' => '作品集id不能为空',
		'resource_id.required'  => '资源id不能为空',
		'type.numeric'          => '类型数据格式必须为数字',
		'portfolio_id.numeric'  => '作品集id据格式必须为数字',
		'resource_id.numeric'   => '资源id据格式必须为数字',
	];
}